package com.store.utils;

import java.util.List;
import java.util.stream.Collectors;


/**
 * List对象Copy复制
 */
public class ListCopyUtil {

    /**
     * @param list
     * @param clazz
     * @return
     */
    public static List copy(List list, Class clazz) {
        if (list != null) {
            return (List) list.stream().map(i -> BeanConvertUtils.copyProperties(i, clazz)).collect(Collectors.toList());
        }
        return null;
    }

}
